package compiler.terminals;

import compiler.HowlToken;
import compiler.HowlType;
import compiler.TokenReader;
import compiler.exceptions.HowlParserException;

/**
 * Class to represent the name of a Howl data feed.
 * 
 * @author Sarah Mount <s.mount@wlv.ac.uk>
 * @version 16 Dec 2009
 * 
 * @see compiler.nonterminals.CreateStmt
 * @see compiler.nonterminals.RegisterStmt
 * @see compiler.nonterminals.InsertStmt
 * @see compiler.nonterminals.DeregisterStmt
 * @see compiler.nonterminals.DeleteStmt
 */
public class FeedName extends HowlToken {

	private String feedname;

	public FeedName(TokenReader tokenReader) {
		super(tokenReader);
	}

	@Override
	public String codeGenerate() {
		return this.feedname;
	}

	@Override
	public HowlToken parse() throws HowlParserException {
		this.feedname = this.tokenReader.consumeToken();
		return this;
	}

	@Override
	public String toString() {
		return this.feedname;
	}

	/**
	 * @return the feedname
	 */
	public String getFeedname() {
		return feedname;
	}

	/**
	 * @param feedname the feedname to set
	 */
	public void setFeedname(String feedname) {
		this.feedname = feedname;
	}

}
